﻿<DragonSparkConfiguration:ConfigurationDictionary x:Class="DragonSpark.Testing.IoC.Configuration.Core"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:DragonSparkConfiguration="clr-namespace:DragonSpark.Configuration;assembly=DragonSpark" 
	xmlns:System="clr-namespace:System;assembly=mscorlib" 
	xmlns:IoC="clr-namespace:DragonSpark.IoC;assembly=DragonSpark"
	xmlns:Configuration="clr-namespace:DragonSpark.IoC.Configuration;assembly=DragonSpark"
	xmlns:TestObjects="clr-namespace:DragonSpark.Testing.TestObjects.IoC" x:TypeArguments="IoC:LocatorDefinition"
	>
	<System:Int32 x:Key="Pimpin">6776</System:Int32>
	<IoC:LocatorDefinition x:Key="DefaultContainer">
		<Configuration:AssignServiceLocatorCommand />
		<Configuration:UnityContainerConfiguration>
			<!-- Basic NamedTypeObject: -->
			<Configuration:UnityType RegistrationType="{x:Type TestObjects:INamedObject}" MapTo="{x:Type TestObjects:NamedObject}">
				<Configuration:InjectionProperty PropertyName="Name" Parameter="Mapped Named Object" />
			</Configuration:UnityType>

			<!-- NamedTypeObject with String Type: -->
			<Configuration:UnityType BuildName="Default" RegistrationType="{x:Type TestObjects:INamedTypeObject}" MapTo="{x:Type TestObjects:NamedTypeObject}">
				<Configuration:InjectionProperty PropertyName="Name" Parameter="Mapped Named-Type Object" />
				<Configuration:InjectionProperty PropertyName="Type">
					<Configuration:InstanceValue Instance="{x:Type System:String}" />
				</Configuration:InjectionProperty>
			</Configuration:UnityType>

			<!-- NamedTypeObject with Int32 Type: -->
			<Configuration:UnityType BuildName="Normal" RegistrationType="{x:Type TestObjects:INamedTypeObject}" MapTo="{x:Type TestObjects:NamedTypeObject}">
				<Configuration:InjectionProperty PropertyName="Name" Parameter="Named-Type Object" />
				<Configuration:InjectionProperty PropertyName="Type">
					<Configuration:InstanceValue Instance="{x:Type System:Int32}" />
				</Configuration:InjectionProperty>
			</Configuration:UnityType>

			<!-- GenericObject with INamedTypeObject Type: -->
			<Configuration:UnityType>
				<Configuration:UnityType.RegistrationType>
					<x:Type TypeName="TestObjects:GenericObject(TestObjects:INamedTypeObject)" />
				</Configuration:UnityType.RegistrationType>
				<Configuration:InjectionProperty PropertyName="Property">
					<Configuration:DependencyValue DependencyType="{x:Type TestObjects:INamedTypeObject}" BuildName="Normal" />
				</Configuration:InjectionProperty>
			</Configuration:UnityType>

			<Configuration:UnityType RegistrationType="{x:Type TestObjects:ConstructorObject}">
				<Configuration:InjectionConstructor>
					<Configuration:InstanceValue Instance="String-based Construction!" />
				</Configuration:InjectionConstructor>
			</Configuration:UnityType>

			<Configuration:UnityType RegistrationType="{x:Type TestObjects:ConstructorObject}" BuildName="Int">
				<Configuration:InjectionConstructor>
					<Configuration:InstanceValue Instance="{StaticResource Pimpin}" />
				</Configuration:InjectionConstructor>
			</Configuration:UnityType>

			<Configuration:UnityType RegistrationType="{x:Type TestObjects:MethodObject}">
				<Configuration:InjectionMethod MethodName="Method">
					<Configuration:InstanceValue Instance="Hello Method Call!" />
				</Configuration:InjectionMethod>
			</Configuration:UnityType>
			<Configuration:UnityContainerConfiguration.Extensions>
				<IoC:DragonSparkExtension />
			</Configuration:UnityContainerConfiguration.Extensions>
		</Configuration:UnityContainerConfiguration>
	</IoC:LocatorDefinition>
</DragonSparkConfiguration:ConfigurationDictionary>
